﻿#ifndef DEPTSERVICE_H
#define DEPTSERVICE_H

#include <QObject>
#include <dept.h>
#include <deptvo.h>

class DeptService : public QObject
{
    Q_OBJECT
public:
    explicit DeptService(QObject *parent = nullptr);
    ~DeptService();
    bool getDeptVOList(QList<DeptVO> &list);
    bool getList(QList<Dept> &list);
    bool getOne(Dept &object);
    bool saveOne(Dept &object);
    bool deleteOne(Dept &object);
private:
    bool getDeptVOListByPid(QList<DeptVO> &list,uint64_t pid);
private:
    QSqlDatabase db;
};

#endif // DEPTSERVICE_H
